package com.chukun.shardingsphere.service.impl;

import com.chukun.shardingsphere.entity.HealthLevel;
import com.chukun.shardingsphere.repository.HealthLevelRepository;
import com.chukun.shardingsphere.service.IHealthLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;


@Service
public class HealthLevelService implements IHealthLevelService {

	@Autowired
	private HealthLevelRepository healthLevelRepository;
	
	@Override
	public void processLevels() throws SQLException {
		healthLevelRepository.save(new HealthLevel(1, "level1"));
		healthLevelRepository.save(new HealthLevel(2, "level2"));
		healthLevelRepository.save(new HealthLevel(3, "level3"));
		healthLevelRepository.save(new HealthLevel(4, "level4"));
		healthLevelRepository.save(new HealthLevel(5, "level5"));
	}
}
